(function($){
var arkflow = $.arkflow;

var ArkFlowContextPath = window.ArkFlowContextPath || '/arkflow/';

$.extend(true,arkflow.config.rect,{
	attr : {
        r : 8,
        fill : '#F6F7FF',
        stroke : '#03689A',
        "stroke-width" : 2
    }
});

$.extend(true,arkflow.config.props.props,{
	name : {name:'name', label:'名称', value:'新建流程', editor:function(){return new arkflow.editors.InputEditor();}},
	key : {name:'key', label:'标识', value:'', editor:function(){return new arkflow.editors.InputEditor();}},
	desc : {name:'desc', label:'描述', value:'', editor:function(){return new arkflow.editors.InputEditor();}}
});

$.extend(true,arkflow.config.tools.states,{
	start : {
        showType: 'image',
        type : 'start',
        name : {text:'<<start>>'},
        text : {text:'开始'},
        img : {src : ArkFlowContextPath + 'resource/48/start_event_empty.png',width : 48, height:48},
        attr : {width:50 ,heigth:50 },
        props : {
            text: {name:'text',label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'开始'},
            temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
        }
    },
    end : {
        showType: 'image',
        type : 'end',
        name : {text:'<<end>>'},
        text : {text:'结束'},
        img : {src : ArkFlowContextPath + 'resource/48/end_event_terminate.png',width : 48, height:48},
        attr : {width:50 ,heigth:50 },
        props : {
            text: {name:'text',label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'结束'},
            temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
        }
    },
    'end-cancel' : {
        showType: 'image',type : 'end-cancel',
        name : {text:'<<end-cancel>>'},
        text : {text:'取消'},
        img : {src : ArkFlowContextPath + 'resource/48/end_event_cancel.png',width : 48, height:48},
        attr : {width:50 ,heigth:50 },
        props : {
            text: {name:'text',label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'取消'},
            temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
        }
    },
    'end-error' : {
        showType: 'image',type : 'end-error',
        name : {text:'<<end-error>>'},
        text : {text:'错误'},
        img : {src : ArkFlowContextPath + 'resource/48/end_event_error.png',width : 48, height:48},
        attr : {width:50 ,heigth:50 },
        props : {
            text: {name:'text',label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'错误'},
            temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
        }
    },
    state : {
        showType: 'text',type : 'state',
        name : {text:'<<state>>'},
        text : {text:'状态'},
        img : {src : ArkFlowContextPath + 'resource/48/task_empty.png',width : 48, height:48},
        props : {
            text: {name:'text',label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'状态'},
            temp1: {name:'temp1', label : '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor([{name:'aaa',value:1},{name:'bbb',value:2}]);}}
        }
    },
    decision : {
        showType: 'image',type : 'decision',
        name : {text:'<<decision>>'},
        text : {text:'判断'},
        img : {src :ArkFlowContextPath + 'resource/48/gateway_parallel.png',width :48, height:48},
        attr : {width:50 ,heigth:50 },
        props : {
            text: {name:'text', label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'判断'},
            temp1: {name:'temp1', label: '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor('select.json');}}
        }
    },
    fork : {
        showType: 'image',type : 'fork',
        name : {text:'<<fork>>'},
        text : {text:'分支'},
        img : {src : ArkFlowContextPath + 'resource/48/gateway_parallel.png',width :48, height:48},
        attr : {width:50 ,heigth:50 },
        props : {
            text: {name:'text', label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'分支'},
            temp1: {name:'temp1', label: '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor('select.json');}}
        }
    },
    join : {
        showType: 'image',type : 'join',
        name : {text:'<<join>>'},
        text : {text:'合并'},
        img : {src : ArkFlowContextPath + 'resource/48/gateway_parallel.png',width :48, height:48},
        attr : {width:50 ,heigth:50 },
        props : {
            text: {name:'text', label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'合并'},
            temp1: {name:'temp1', label: '文本', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            temp2: {name:'temp2', label : '选择', value:'', editor: function(){return new arkflow.editors.SelectEditor('select.json');}}
        }
    },
    task : {
        showType: 'text',type : 'task',
        name : {text:'<<task>>'},
        text : {text:'任务'},
        img : {src : ArkFlowContextPath + 'resource/48/task_empty.png',width :48, height:48},
        props : {
            text: {name:'text', label: '显示', value:'', editor: function(){return new arkflow.editors.TextEditor();}, value:'任务'},
            assignee: {name:'assignee', label: '用户', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            form: {name:'form', label : '表单', value:'', editor: function(){return new arkflow.editors.InputEditor();}},
            desc: {name:'desc', label : '描述', value:'', editor: function(){return new arkflow.editors.InputEditor();}}
        }
    }
});
})(jQuery);